function createArray<T>(length: number, value: T): Array<T> {
  let result: T[] = []
  for (let i = 0; i < length; i++) {
    result[i] = value
  }
  return result
}

createArray<string>(3, 'x') // ['x','x','x']
createArray<number>(2, 1)[0] // [1,1]

let arr9: number[] = [1, 2, 3]
let arr8: Array<number> = [1, 2, 3]

let xxx = document.body
